import Vue from 'vue'

let server = process.env.VUE_APP_RESTAURANTPCSERVICE;
let searchAllByPageUrl = '/goodorder/searchAllByPage';
let getOrderByOrderInfoUrl = '/goodorder/getOrderByOrderInfo';
let deleteByIdUrl = '/goodorder/deleteById';
let deleteByGroupUrl = '/goodorder/deleteByGroup';

let searchByConstantUrl = '/constant/searchByConstant';

export default{
	searchAllByPageService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${searchAllByPageUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
	getOrderByOrderInfoService: function(paramsObj,params,callBack){
		Vue.axios.post(`${server}${getOrderByOrderInfoUrl}`, paramsObj,{
			params:params
		}).then(res => {
			callBack(res.data);
		})
	},
	deleteByIdService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${deleteByIdUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
	deleteByGroupService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${deleteByGroupUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
	
	searchByConstantService: function(paramsObj,callBack){
		Vue.axios.post(`${server}${searchByConstantUrl}`, paramsObj).then(res => {
			callBack(res.data);
		})
	},
}